#ifndef _FUNCTION1_
#define _FUNCTION1_

#include <math.h>
#define pi 4.0 * atan(1.0)

double f(double *p)
{
    return 2 * pi * pi * sin(pi * p[0]) * sin(pi * p[1]);
}

double bc(double *p)
{
    return sin(pi * p[0]) * sin(pi * p[1]);
}

double f2(double *p)
{
    return 1;
}

double bc2(double *p)
{
    return cos(pi * p[0]) * cos(pi * p[1]);
}
double a(double *p)
{
    return 1;
}
double g1(double *p)
{
    return 0;
}
double g2(double *p)
{
    return 0;
}
double g3(double *p)
{
    return 0;
}
double g4(double *p)
{
    return 0;
}
double u(double *p)
{
    double z = 0;
    for (int k = 1; k < 200; k += 2)
    {
        z += sin(k * pi * (1 + p[0]) / 2) / (k * k * k * sinh(k * pi)) * (sinh(k * pi * (1 + p[1]) / 2) + sinh(k * pi * (1 - p[1]) / 2));
    }
    return (1 - p[0] * p[0]) / 2 - 16 * z / (pi * pi * pi);
}
double fe(double *p)
{
    return 1;
}

#else
#endif